package main.Q1801_1900;

public class Q1881_1890 {
    public static void main(String[] args) {
        System.out.println("Question1881：");
        System.out.println("Question1882：");
        System.out.println("Question1883：");
        System.out.println("Question1884：鸡蛋掉落-两枚鸡蛋");
        System.out.println("Question1885：");
        System.out.println("Question1886：判断矩阵经轮转后是否一致");
        System.out.println("Question1887：");
        System.out.println("Question1888：");
        System.out.println("Question1889：");
        System.out.println("Question1890：");
    }
}

class Question1884 {
    public int twoEggDrop(int n) {
        return (int) Math.ceil(Math.sqrt(2 * n + 0.25) - 0.5);
    }
}

class Question1886 {
    public boolean findRotation(int[][] mat, int[][] target) {
        int n = mat.length;
        boolean b1 = true, b2 = true, b3 = true, b4 = true;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                //旋转90度
                if (mat[n - j - 1][i] != target[i][j]) {
                    b1 = false;
                }
                //旋转180度
                if (mat[n - i - 1][n - j - 1] != target[i][j]) {
                    b2 = false;
                }
                //旋转270度
                if (mat[j][n - i - 1] != target[i][j]) {
                    b3 = false;
                }
                //旋转360度
                if (mat[i][j] != target[i][j]) {
                    b4 = false;
                }
            }
        }
        return b1 || b2 || b3 || b4;
    }
}